***Do Electoral Rules Matter? Explaining National Differences in Women�s Representation in the European Parliament
***do file prepared by JFR
***replication of tables and graphs


***use: FortinRittberger&Rittberger_data.dta
***we have left addtional variables in the dataset


***Figure 1 to 4 were simple histograms and provided as graph files.


***Figure 5
****Overlaid by electoral rules
#delimit;
twoway (scatter difference_rep lh_percentw if lh_plurality==1 & lh_pr==0 & year==2009, msize(large) msymbol(square) mlabels(country) mlabcolor(black) mcolor(black) mfcolor(red) yline(0))
(scatter difference_rep  lh_percentw if lh_plurality==0 & lh_pr==1 & year==2009, msize(large) msymbol(diamond) mlabels(country) mlabcolor(black) mcolor(black) mfcolor(lavender)) 
(scatter difference_rep  lh_percentw if lh_plurality==1 & lh_pr==1 & year==2009, msize(large) msymbol(circle) mlabels(country) mlabcolor(black) mcolor(black) mfcolor(lime)) ; 
#delimit cr

***Table 1
***pwcorrs lower house
pwcorr lh_percentw lh_disprop2  lh_logDM2  lh_effectthreshold if year==2009 & code~=18, sig
**remove Malta for disprop
pwcorr lh_percentw lh_disprop2  lh_logDM2  lh_effectthreshold var40 if year==2009, sig
pwcorr lh_percentw lh_disprop2  lh_logDM2  lh_effectthreshold var40 if year==2004, sig
***pwcorr EP
pwcorr ep_percentw ep_disprop  ep_logDM ep_effectthreshold var40 if year==2004, sig
pwcorr ep_percentw ep_disprop  ep_logDM ep_effectthreshold var40 if year==2009, sig
spearman ep_percentw ep_balloclosed ep_ballocordered ep_ballotopen if year==2009, pw star(.1)

***table 2
jackknife: reg ep_percentw var40 if year==2009 & country~="Malta"
jackknife: reg ep_percentw var40 lh_percentw polyno if year==2009 & country~="Malta"
jackknife: reg ep_percentw var40 lh_percentw polyno ep_EU if year==2009 & country~="Malta"
jackknife: reg ep_percentw var40 lh_percentw polyno ep_EU2 if year==2009
jackknife: reg ep_percentw var40 lh_percentw polyno ep_leftright if year==2009

***table 3
jackknife: reg  difference_rep lh_percentw  polyno if year==2009 & country~="Malta"
jackknife: reg  difference_rep lh_percentw  polyno difference_disprop2   if year==2009 & country~="Malta"
jackknife: reg  difference_rep lh_percentw  polyno difference_logDM      if year==2009 & country~="Malta"
jackknife: reg  difference_rep lh_percentw  polyno difference_effthresh  if year==2009 & country~="Malta"
jackknife: reg  difference_rep lh_percentw  polyno difference_turn2      if year==2009 & country~="Malta"

